<include file="Common/header" />
<!-- 导航栏 -->
{$bread_crumb}
<!-- 导航栏 -->
<div class="page-container">
    <form action="{:U(CONTROLLER_NAME.'/update')}" method="post" class="form form-horizontal" enctype="multipart/form-data" onsubmit="return submit_before()">
        <input type="hidden" name="id" value="{$data.id}">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>字符串：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" placeholder="" id="" name="e_varchar" value="{$data.e_varchar}" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>价钱：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" style="width:20%" placeholder="" id="" name="e_decimal"  value="{$data.e_decimal}" > 元
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>选择1：</label>
            <div class="formControls col-xs-8 col-sm-9"> 
                {$select}
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>选择2（需要修改）：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                {$radio}
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">是否类型（需要修改）：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                <div class="check-box" <if condition="$data['e_is'] eq 1" >checked</if> >
                    <input type="checkbox" name="e_is">
                    <label for="checkbox-1">&nbsp;</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">小文本：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea cols="" rows="" class="textarea"  placeholder="说点什么...最少输入10个字符" name="m[e_min_text]">{$data.e_min_text}</textarea>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">详细（大文本）：</label>
            <input type="hidden" name="m[e_text]" id="e_text">
            <div class="formControls col-xs-8 col-sm-9"> 
                <script id="editor" type="text/plain" style="width:100%;height:400px;"></script> 
            </div>
        </div>
        <if condition="$data['e_image']">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">图片：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <img width="300" class="thumbnail" src="{$data['e_image']}">
                </div>
            </div>
        </if>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">新图片/文件：</label>
            <div class="formControls col-xs-8 col-sm-9"> <span class="btn-upload form-group">
                <input class="input-text upload-url" type="text" name="uploadfile" readonly>
                <a href="javascript:void();" class="btn btn-primary radius upload-btn"><i class="Hui-iconfont">&#xe642;</i> 浏览</a>
                <!-- 上传图片的name 不可与数据库字段名一致 -->
                <input type="file" multiple name="image" class="input-file">
                </span>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">日期：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd'})" class="input-text Wdate" style="width:180px;" id="datemin" name="e_date" value="{$data.e_date}">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">时间：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})"  class="input-text Wdate" style="width:180px;" id="datetime" name="e_datetime" value="{$data.e_datetime}">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">一行多个（可不需要）：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" style=" width:25%" placeholder="输入长度" id="val1" name="val1" value="{$data['val1']}" >
                MM
                <input type="text" class="input-text" style=" width:25%" placeholder="输入长度" id="val2" name="val2" value="{$data['val2']}">
                MM
                <input type="text" class="input-text" style=" width:25%" placeholder="输入长度" id="val3" name="val3" value="{$data['val3']}">
                MM
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交审核</button>
                <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
<include file="Common/footer" />
<script type="text/javascript">
/*checkbox*/
$(function(){
    var ue = UE.getEditor('editor');
        $('.skin-minimal input').iCheck({
        checkboxClass: 'icheckbox-blue',
        radioClass: 'iradio-blue',
        increaseArea: '20%'
    });/*{$data['e_text']}
    ue.ready(function() {//编辑器初始化完成再赋值  
        ue.setContent('555555');  //赋值给UEditor  
    });*/
    ue.addListener('ready', function (editor) {
        ue.setContent('{$data['e_text']|htmlspecialchars_decode}');
    });
});
/*表单提交之前的操作，主要针对一些数据类型*/
function submit_before() {
    $('#e_text').val(UE.getEditor('editor').getContent());
}


</script> 